﻿@model eShop.Web.Framework.PromptModel
@{
    Layout = null;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>消息提示</title>
    <link href="/administration/css/site.css" rel="stylesheet" type="text/css" />
    @{
        if (Model.IsAutoBack)
        {
            if (Model.CountdownModel == 0)
            {
                <meta http-equiv="refresh" content="@Model.CountdownTime;URL=@Model.BackUrl" />
            }
            else
            {
                <script type="text/javascript">
                    window.onload = function(){
                        var time = @Model.CountdownTime; //设置时间为几秒
                        var timer = document.getElementById('timer'); //获取ID为timer的对象
                        timer.innerHTML = time; //初始化显示秒数
                        time = time - 1;
                        var g = window.setInterval(function(){
                            if(time<0){
                                window.clearTimeout(g); //清除动画
                                window.location.href = '@Model.BackUrl'; //跳转到指定地址
                                //window.history.back(-1); //后退
                            } else {
                                showTime();
                            }
                        },1000);
                        //显示函数
                        function showTime(){
                            timer.innerHTML = time;
                            time--;
                        }
                    };
                </script>
            }
        }
    }
</head>
<body>
    <h1 class="rightH1">后台操作 &gt;&gt; 操作提示</h1>
    <div class="tip">
        <h3>@Html.Raw(Model.Message)</h3>
        <p>
            如果您不做出选择，将在
            @{
                if (Model.CountdownModel == 0)
                {
                    @Model.CountdownTime
                }
                else
                {
                    <span id="timer">@Model.CountdownTime</span>
                }
            }
            秒后自动返回
        </p>
        @if (Model.IsShowBackLink)
        {
            <a href="@Model.BackUrl">←点击返回</a>
        }
    </div>
    @*<div id="bottom">
        Copyright @@2012-2015 eShop.com Inc. All Rights Reserved 程序版本:2.1.525
    </div>*@
</body>
</html>
